import cates from './shopCart.json';
console.log(12121,'ca',cates)
let adList = [
    {
        title: '暑假5折',
        img: 'http://images2015.cnblogs.com/blog/138012/201610/138012-20161016191639092-2000037796.png',
        link: 'http://www.imooc.com/wap/index'
    },
    {
        title: '特价出国',
        img: 'http://images2015.cnblogs.com/blog/138012/201610/138012-20161016191648124-298129318.png',
        link: 'http://www.imooc.com/wap/index'
    },
    {
        title: '亮亮车',
        img: 'http://images2015.cnblogs.com/blog/138012/201610/138012-20161016191653983-1962772127.png',
        link: 'http://www.imooc.com/wap/index'
    },
    {
        title: '学钢琴',
        img: 'http://images2015.cnblogs.com/blog/138012/201610/138012-20161016191700420-1584459466.png',
        link: 'http://www.imooc.com/wap/index'
    },
    {
        title: '电影',
        img: 'http://images2015.cnblogs.com/blog/138012/201610/138012-20161016191706733-367929553.png',
        link: 'http://www.imooc.com/wap/index'
    },
    {
        title: '旅游热线',
        img: 'http://images2015.cnblogs.com/blog/138012/201610/138012-20161016191713186-495002222.png',
        link: 'http://www.imooc.com/wap/index'
    }
]
let likeList = [
    {
        id: 0,
        img: 'http://images2015.cnblogs.com/blog/138012/201610/138012-20161016201645858-1342445625.png',
        title: '天下第一锅',
        star: 4,
        price: '88',
        subTitle: '重庆 & 四川 麻辣火锅',
        desc: '营业时间 11:00 - 21:00 <br> 电话订购 11:00 - 19:00 <br> 网络订购 11:00 - 19:00'
    },
    {
        img: 'https://upload-images.jianshu.io/upload_images/2311378-9ade9407332fad60.jpg',
        title: '汉堡大大',
        subTitle: '叫我汉堡大大，还你多彩口味',
        price: '28',
        distance: '120m',
        mumber: '389',
        id: Math.random().toString().slice(2)
    },
    {
        img: 'http://images2015.cnblogs.com/blog/138012/201610/138012-20161016201645858-1342445625.png',
        title: '北京开源饭店',
        subTitle: '[望京]自助晚餐',
        price: '98',
        distance: '140m',
        mumber: '689',
        id: Math.random().toString().slice(2)
    },
    {
        img: 'http://images2015.cnblogs.com/blog/138012/201610/138012-20161016201652952-1050532278.png',
        title: '服装定制',
        subTitle: '原价xx元，现价xx元，可修改一次',
        price: '1980',
        distance: '160',
        mumber: '106',
        id: Math.random().toString().slice(2)
    },
    {
        img: 'http://images2015.cnblogs.com/blog/138012/201610/138012-20161016201652952-1050532278.png',
        title: '服装定制',
        subTitle: '原价xx元，现价xx元，可修改一次',
        price: '1980',
        distance: '160',
        mumber: '106',
        id: Math.random().toString().slice(2)
    },
    {
        img: 'http://images2015.cnblogs.com/blog/138012/201610/138012-20161016201652952-1050532278.png',
        title: '服装定制',
        subTitle: '原价xx元，现价xx元，可修改一次',
        price: '1980',
        distance: '160',
        mumber: '106',
        id: Math.random().toString().slice(2)
    },
    {
        img: 'http://images2015.cnblogs.com/blog/138012/201610/138012-20161016201652952-1050532278.png',
        title: '服装定制',
        subTitle: '原价xx元，现价xx元，可修改一次',
        price: '1980',
        distance: '160',
        mumber: '106',
        id: Math.random().toString().slice(2)
    },
    {
        img: 'http://images2015.cnblogs.com/blog/138012/201610/138012-20161016201700186-1351787273.png',
        title: '婚纱摄影',
        subTitle: '免费试穿，拍照留念',
        price: '2899',
        distance: '160',
        mumber: '58',
        id: Math.random().toString().slice(2)
    },
    {
        img: 'http://images2015.cnblogs.com/blog/138012/201610/138012-20161016201708124-1116595594.png',
        title: '麻辣串串烧',
        subTitle: '双人免费套餐等你抢购',
        price: '0',
        distance: '160',
        mumber: '1426',
        id: Math.random().toString().slice(2)
    }
]
let shopCommentList = [
    {
        username: '133****3355',
        comment: '非常好吃，棒棒的，下次再来',
        star: 5
    },
    {
        username: '135****3452',
        comment: '羊肉够分量，不错',
        star: 4
    },
    {
        username: '137****1242',
        comment: '有自助的水果，非常喜欢',
        star: 4
    },
    {
        username: '131****3980',
        comment: '桌子环境有点糟糕，不喜欢',
        star: 2
    },
    {
        username: '135****3565',
        comment: '基本还可以，中规中矩吧，虽然没有啥惊喜',
        star: 3
    },
    {
        username: '130****9879',
        comment: '感觉很棒，服务员态度非常好',
        star: 5
    },
    {
        username: '186****7570',
        comment: '要是能多给开点发票就好了，哈哈啊',
        star: 4
    }
]
let address=[{
    id:0,
    name:"xy0",
    phone:"1097XXXX",
    address:"上海浦上海浦东新区上海浦东新区上海浦东新区上海浦东新区上海浦东新区上海浦东新区上海浦东新区东新区",
    tag:1,//1家，2公司，3默认，4其他 0空
},{
    id:1,
    name:"xy1",
    phone:"1097XXXX",
    address:"上海浦上海浦东新区上海浦东新区上海浦东新区上海浦东新区上海浦东新区上海浦东新区上海浦东新区东新区",
    tag:1,//1家，2公司，3默认，4其他 0空
},{
    id:2,
    name:"xy2",
    phone:"1097XXXX",
    address:"上海浦上海浦东新区上海浦东新区上海浦东新区上海浦东新区上海浦东新区上海浦东新区上海浦东新区东新区",
    tag:2,//1家，2公司，3默认，4其他 0空
},{
    id:3,
    name:"xy3",
    phone:"1097XXXX",
    address:"上海浦上海浦东新区上海浦东新区上海浦东新区上海浦东新区上海浦东新区上海浦东新区上海浦东新区东新区",
    tag:3,//1家，2公司，3默认，4其他 0空
}]
export default {
    'post|/shopAdList.json': { code: 200, data: adList, maxlen: 40 },
    'post|/shoplikeList.json': {
        code: 200, data: () => {
            return likeList.map(i => {
                // i.img="https://img4.mukewang.com/szimg/5fbf616b09c6210a12000676.png"
                return i;
            })
        }, maxlen: 40
    },
    'post|/shopDetails.json': (i) => {
        // let { id } = JSON.parse(i.body);
        return { code: 200, data: likeList[0] }
    },
    'post|/shopOrder.json': (i) => {
        let { type } = JSON.parse(i.body);
        let obj = {
            type,
            id: 0,
            img: 'http://images2015.cnblogs.com/blog/138012/201610/138012-20161016201645858-1342445625.png',
            title: '天下第一锅',
            star: 4,
            price: '88',
            subTitle: '重庆 & 四川 麻辣火锅',
            desc: '营业时间 11:00 - 21:00 <br> 电话订购 11:00 - 19:00 <br> 网络订购 11:00 - 19:00'
        }
        let arr = []
        for (let index = 0; index < 10; index++) {
            arr.push(obj)
        }
        return { code: 200, data: arr, maxlen: 40 }
    },
    'post|/shopCommentList.json': { code: 200, data: shopCommentList, maxlen: 140 },
    'post|/shopCates.json': { code: 200, data: cates },
    'post|/getAddress.json': { code: 200, data:  address ,maxlen: 1 },
}